package com.third.customer.site.controller.req;

import com.third.customer.model.dao.param.CustomerParam;
import lombok.Data;

/**
 * Created by hehuaichun on 2020/5/23.
 */
@Data
public class CustomerQueryReq {

    private Long groupId;

    private Long areaId;

    private String name;

    private String phone;

    private int page = 0;

    private int limit = 10;

    public CustomerParam toParam(Long companyId) {
        CustomerParam param = new CustomerParam();
        param.setCompanyId(companyId);
        param.setAreaId(areaId);
        param.setGroupId(groupId);
        param.setName(name);
        param.setPhone(phone);
        param.setPage(page);
        param.setLimit(limit);
        return param;
    }
}
